package com.zte.warehouse.dao;

import com.zte.warehouse.model.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;


@Mapper
@Repository
public interface IInWarehouseDao {

    /**
     * query
     *
     * @param conn
     * @return
     */
    public List<InWarehose> queryInWarehoseListByCondition(InWarehouseCondition conn);

    public int addInWarehose(AddInWarehose addInWarehose);

    public int updatePurchase(Purchase purchase);


    //出入库
    //更新状态
    public int updateInWarehose(AddInWarehose addInWarehose);
    //更新金额
    public int updateWarehose(SingleWarehouse singleWarehouse);

    //!查询采购单、采购详情   purchaseId  warehuoseId  count（据purchaseId获取）
    public Purchase queryPurchaseAndDetails(String purchaseId);

    //!查询库中是否有存该商品   WarehouseID,productId      ，  count
    public StockInsert queryIsStock(StockInsert stockInsert);

    //!更新库存商品数量   WarehouseID,productId      ，  count
    public int updateIsStock(StockInsert stockInsert);

    //入库
    //查询应插入库存信息
    public List<StockInsert> queryInsertStockMessage(String indent);
    //插入库存信息
    public int InsertStockMessage(StockInsert stockInsert);


    public Purchase queryPurchaseState(String indent);//验证采购单审核状态


}
